import request from '@/utils/request'

// 查询待会吃什么列表
export function listWhatToEat(query) {
    return request({
        url: '/food/whatToEat/list',
        method: 'get',
        params: query
    })
}

export function autoComplete(query) {
  return request({
    url: '/food/whatToEat/autoComplete',
    method: 'get',
    params: query
  })

}export function listWhatToEatAll(query) {
  return request({
    url: '/food/whatToEat/totalList',
    method: 'get',
    params: query
  })
}

// 查询待会吃什么详细
export function getWhatToEat(id) {
    return request({
        url: '/food/whatToEat/' + id,
        method: 'get'
    })
}

// 新增待会吃什么
export function addWhatToEat(data) {
    return request({
        url: '/food/whatToEat/add',
        method: 'post',
        data: data
    })
}

// 修改待会吃什么
export function updateWhatToEat(data) {
    return request({
        url: '/food/whatToEat',
        method: 'put',
        data: data
    })
}

// 删除待会吃什么
export function delWhatToEat(id) {
    return request({
        url: '/food/whatToEat/' + id,
        method: 'delete'
    })
}
